package Classwork;

import java.util.Scanner;

public class Work01 {
    public static void main(String[] args) {
        int n=1,s=1,m;
        Scanner reader=new Scanner(System.in);
        do{
            System.out.print("请输入一个数：");
            m=reader.nextInt();
        }while(m<=1);
        while(s<m){
            s*=n;
            n++;
        }
        System.out.println("最大值s="+s/(n-1)+"  "+"个数："+(n-2));
    }
}
